全部文档

7.4云网关命令管理

命令下发会指定某台云网关设备,并对此设备的指定属性进行异步读写。

7.4.1分组批量下发云网关异步命令

功能描述:提供对指定组下的云网关设备的读,写命令的下发功能,返回命令执行的结果。

POST  /api/v1/command/multi/tcp

Body:

Name Type Description Required
groupId int 组ID Yes
functionType string 命令类型,可选值propertyGet/propertySet Yes
identifier string 属性名 Yes
identifierValue object 属性值,functionType值为propertySet时必需,值类型:String/Integer/Long/Float/Double/Boolean/Date/Bytes No

Body example:

{
    "groupId": 674,
    "functionType": "propertySet",
    "identifier": "tempratrue",
    "identifierValue": 30
}
当功能属性类型为Bytes时,identifierValue由多个16进制字符和空格组成,空格无实际意义,例如:
"identifierValue": "13 0F 03"

cURL example:

curl --location --request POST '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/command/multi/tcp?accessKeyId={accessKeyId}&signatureNonce=495&signature={signature}' \
--header 'platform: 1' \
--header 'projectId: {projectId}' \
--header 'Content-Type: application/json' \
--data-raw '{
                "groupId": 674,
                "functionType": "propertySet",
                "identifier": "tempratrue",
                "identifierValue": 30
            }'

Response data:

Name Type Description
batchId String 批次ID

Response example:

{
    "success": true,
    "code": 0,
    "msg": "",
    "data": {
        "batchId":"xxxx"
    }
}

results matching ""

    No results matching ""